public class Text {
    //翻转链表2
    /*public static ListNode reverseBetween(ListNode head, int left, int right) {
        ListNode Head = new ListNode(0,head);
        int count = left;
        ListNode pre = Head;
        while(count-1 != 0){
            pre = pre.next;
            count--;
        }

        ListNode cur = pre.next;
        count = right - left;
        while(count != 0){
            ListNode curnext = cur.next;
            cur.next = curnext.next;
            curnext.next = pre.next;
            pre.next = curnext;

            count--;
        }
        return Head.next;
    }*/
    //翻转链表1
    /*public static ListNode reverseList(ListNode head) {
        if(head == null){
            return null;
        }
        ListNode cur = head.next;
        head.next=null;
        while(cur != null){
            ListNode curnext = cur.next;

            cur.next=head;
            head=cur;
            cur=curnext;
            if(curnext == null){
                break;
            }
            curnext=curnext.next;
        }

        return head;
    }*/
}
